#ifndef _EQCOMMON_OBJSTATE_H
#define _EQCOMMON_OBJSTATE_H

#include <co/object.h>

#include <eq/gl.h>

namespace eqCommon
{
    struct GLfloat2
    {
        GLfloat x, y;
    };
    
    struct GLfloat3
    {
        GLfloat x, y, z;
    };
    
    class ObjState : public co::Object
    {
        public:
            ObjState();
            
            // All angles are in degree.
            void addRotate(GLfloat x, GLfloat y);
            void relativeMove(GLfloat x, GLfloat y, GLfloat z);
            
            GLfloat2 rotate;
            GLfloat  scale;
            GLfloat3 position;
            
            static size_t const lights_count = 2;
            
            GLfloat3 lights[lights_count];
            GLfloat  brightness[lights_count];
            
        protected:
            virtual ChangeType getChangeType() const;
            virtual void getInstanceData(co::DataOStream& os);
            virtual void applyInstanceData(co::DataIStream& is);
    };
}

#endif
